// simple vertex shader


varying vec3 vertex;
varying vec3 position;
varying vec3 normal;
varying vec3 light;

void main()
{
    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
    gl_FrontColor = gl_Color;
    // For texture mapping
    vertex = gl_Vertex.xyz;
    
    // For lighting
    normal = normalize(gl_NormalMatrix * gl_Normal).xyz;
    position = (gl_ModelViewMatrix * gl_Vertex).xyz;
    light = gl_LightSource[0].position.xyz;
}
